package com.spring.util;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class DynamicDataSource extends AbstractRoutingDataSource {

	@Override
	protected Object determineCurrentLookupKey() {
		System.out.println("当前所选数据源："+CustomerContextHolder.getCustomerType());
		return CustomerContextHolder.getCustomerType();
	}

}
